﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Meraz.Core.Data;
using Meraz.Core.Model;

namespace Meraz.Core.Repositories
{
    public interface IRepository<TEntity, TID>
    {
        TEntity GetById(TID id);
        void Add(TEntity entity);
        void Delete(TEntity entity);
        List<TEntity> All();
        IMerazContext context { get; }
    }
    public interface IAliasRepository : IRepository<Alias, int>
    {
        List<Alias> GetBlogAliases(string blogName);
        Alias GetByName(string blogName, string name);
    }
    public interface IFrameRepository : IRepository<Frame, int> { }
    public interface ILinkRepository : IRepository<Link, int>
    { 
        Link GetByHref(int postID, string href);
    }
    public interface IPersonRepository : IRepository<Person, int> { }
    public interface IPostRepository : IRepository<Post, int>
    {
        Post GetByPermalink(string permalink);
    }
    public interface IPosterRepository : IRepository<Poster, int> { Poster GetByName(int postID, string name); }
    public interface IIssueRepository : IRepository<Issue, int> { Issue GetByName(string name); }
    public interface ITopicRepository : IRepository<Topic, int>
    {
        Topic Get(string name);
    }
    public interface ITwitterLinkRepository : IRepository<TwitterLink, long> { }
    public interface ITwitterMentionRepository : IRepository<TwitterMention, long> { }
}
